
<meta charset="utf-8" />	
<form class="form-horizontal" role="form"  id="cooporgMeradd_form">
 <br/>
	<!-- 
	 * Input属性说明:
	 * validate="true"  是否需要验证字段
	 * msg="错误时提示信息"        
	 * datatype="数据类型"
	-->
	<!-- #section:elements.form -->
		<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 合作机构编号： </label>
		<div class="col-sm-4">
			<input type="text" id="cooporgNo" name="cooporgNo" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 商户状态: </label>
		<div class="col-sm-4">
             <select 
						rel="obj.MERSTATUS"
						location="local" 
						name="merStatus" 
						id="merStatus" 
						data-placeholder="" style="width: 120px;vertical-align:middle;" readonly="readonly">
						<option value='' >--请选择--</option>
			</select>
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 商户编号： </label>
		<div class="col-sm-4">

			<input type="text" id="merNo" name="merNo" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 商户名称： </label>
		<div class="col-sm-4">

			<input type="text" id="merName" name="merName" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
	</div>
	<!-- 收单 -->
	<div class="form-group" id="pos_div">
	  <div class="form-group" >			
				<label class="col-sm-2 control-label no-padding-right"
					for="form-field-1"> 终端编号： </label>
				<div class="col-sm-4">
		
					<input type="text" id="terNo" name="terNo" placeholder="" 
						class="col-xs-10 col-sm-7"  readonly="readonly"/>
				</div>
				<label class="col-sm-2 control-label no-padding-right"
					for="form-field-1"> 费率类型: </label>
				<div class="col-sm-4">
		             <select 
								rel="obj.RATETYPE"
								location="local" 
								name="rateType" 
								id="rateType" 
								data-placeholder="" style="width: 120px;vertical-align:middle;" readonly="readonly">
								<option value='' >--请选择--</option>
					</select>
				</div>
		</div>
		<div class="form-group" >	
				<label class="col-sm-2 control-label no-padding-right"
					for="form-field-1"> 费率封顶： </label>
				<div class="col-sm-4">
		
					<input type="text" id="rateTop" name="rateTop" placeholder="" 
						class="col-xs-10 col-sm-7"  readonly="readonly"/>
				</div>
				<label class="col-sm-2 control-label no-padding-right"
					for="form-field-1"> 费率类型 封顶金额： </label>
				<div class="col-sm-4">
		
					<input type="text" id="rateTypeTop" name="rateTypeTop" placeholder="" 
						class="col-xs-10 col-sm-7"  validate="true" readonly="readonly"/>
				</div>
	 </div>
	 <!-- 快捷 -->
	 <div class="form-group" id="shortcut_div">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> T0成本费率(%)： </label>
		<div class="col-sm-4">

			<input type="text" id="rateT0" name="rateT0" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> T1成本费率(%)： </label>
		<div class="col-sm-4">

			<input type="text" id="rateT1" name="rateT1" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 主密钥： </label>
		<div class="col-sm-4">

			<input type="text" id="merKey" name="merKey" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 主密钥校验值： </label>
		<div class="col-sm-4">

			<input type="text" id="checkValue" name="checkValue" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 日交易限额： </label>
		<div class="col-sm-4">

			<input type="text" id="dtLimit" name="dtLimit" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 月交易限额： </label>
		<div class="col-sm-4">

			<input type="text" id="mtLimit" name="mtLimit" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 单笔最低交易额： </label>
		<div class="col-sm-4">

			<input type="text" id="lowLimit" name="lowLimit" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 单笔最高交易额： </label>
		<div class="col-sm-4">

			<input type="text" id="highLimit" name="highLimit" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 第三方批次号： </label>
		<div class="col-sm-4">

			<input type="text" id="batchNo" name="batchNo" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 上次签到时间： </label>
		<div class="col-sm-4">

			<input type="text" id="signTime" name="signTime" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
	</div>
	<div class="form-group">
		
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 编辑时间： </label>
		<div class="col-sm-4">

			<input type="text" id="editDate" name="editDate" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 编辑员： </label>
		<div class="col-sm-4">

			<input type="text" id="editUserName" name="editUserName" placeholder="" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right"
			for="form-field-1"> 路由商户编号： </label>
		<div class="col-sm-4">

			<input type="text" id="routeMerId" name="routeMerId" placeholder="需要绑定的系统商户编号" 
				class="col-xs-10 col-sm-7"  readonly="readonly"/>
		</div>
	</div>
	<input type="hidden" id="editUserId" name="editUserId" />
	
	
	
	
	<div class="form-actions align-right  form-button-box" style="margin-top: 10px">
			<!-- <button class="btn btn-info" type="submit">
				保存
			</button> -->

			&nbsp; 
			<button class="btn" type="button" onclick="javascript:dialog.close(this);">
				 关闭
			</button>
		</div>
	
</form>
<script type="text/javascript">
$(document).ready(function() {
	 var p = dialog.getById('dlg-coopOrgTerselectinf');
		//设置页面初始值
		$("#editUserId").attr("value",p.dataParam.editUserId);
		$("#editUserName").attr("value",p.dataParam.editUserName);
});


$(document).ready(function(){
    var time=setInterval(function(){
		if($("#cooporgNo").val()!=''){
			clearInterval(time);
			$.ajax({
				type : "post",
				url : "mpcoop/cooporgmer/queryCooporgInfById.do",
				data:{cooporgNo:$("#cooporgNo").val()},
				dataType : 'json',
				async:true,
				success : function(result) {
					if (result.rspcod != 200) {
						msg.alert("错误", result.rspmsg + " 错误代码："+ result.rspcod, 'error');
					} else {
						coopType=result.obj.coopType;
						if(coopType == "0" ){//收单
							$("#pos_div").show();
							$("#shortcut_div").hide();
						}
						if(coopType == "1" ){
							$("#pos_div").hide();
							$("#shortcut_div").show();
						}
					}
				},
				error : function(XMLHttpRequest, textStatus) {
					msg.alert("错误", "错误代码：" + XMLHttpRequest.status + ",错误描述："+ textStatus, 'error');
				}
			});
		}
	},100);
	 


});


function submitForm(obj){
	
	//自定义匿名回调函数。 系统默认回调函数：dialogAjaxDone
	return validateCallback(obj,function(result){
		if(result.rspcod== 200){
			msg.alert("提示", result.rspmsg, 'correct');
			$("#grid-table").trigger("reloadGrid");
			dialog.close(obj);
		}else{
			msg.alert("错误", result.rspmsg + " 错误代码："
					+ result.rspcod, 'error');
		}
	});
}

</script>
